<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<%@ include file="/mete.jsp"%>
<link href="${pageContext.request.contextPath }/assets/styles/font-awesome.min.css?v=20160115" rel="Stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/assets/styles/main.css?v=20160115" rel="Stylesheet" type="text/css" />
<!-- jPages插件 -->
<script src="${pageContext.request.contextPath }/js/jquery-1.8.2.min.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath }/js/jPages/css/jPages.css">
<link rel="stylesheet" href="${pageContext.request.contextPath }/js/jPages/css/animate.css">
<script src="${pageContext.request.contextPath }/js/jPages/js/jPages.js"></script>
<script type="text/javascript">
	$(function(){		
		//分页插件
	  $("div.holder").jPages({
	    containerID : "itemContainer"
	  });
	});
	
	function deleteRecord(id){
		//使用ajax技术删除某条记录
		if(confirm("确认删除这条记录吗?")){
			$.get("${pageContext.request.contextPath }/competitive!delete.do",{"id":id},function(resq){
				var json = eval('(' + resq + ')'); 
				if(json.data == 0){
					$("#record_"+id+"").remove();
					alert("删除成功!");
				}else{
					alert("删除失败!");
				}
			})
		}
	}

</script>
</head>
<body>
	<input type="hidden" value="${requestScope.totalCount }"/>
	<div class="meijieRight">
    <div class="main_body">
    <ul></ul>
	    <div class="head">
		    
	        <table>
	        	<tr>
	        	<td class="title">竞标列表</td>
	        	<form action="${pageContext.request.contextPath }/competitive!queryByName.do" method="post" id="queryForm">
		        	<td class="fun">
			        	<span class="add">
				        		<a href="${pageContext.request.contextPath }/competitive!auctionList.do" >
			                    <img src="${pageContext.request.contextPath }/assets/images/add.PNG">
			                    <font>添加</font>
			                </a>
				        </span>
		        		<span class="find">
		        				<input id="queryName" type="text" placeholder="招标单位名称" name="queryName"/>
		        				<a href="javascript:document.getElementById('queryForm').submit();"><font>&nbsp查询</font></a>
		        		</span>
		        	</td>
	        	</form>
	        	</tr>
	        </table>
	        
        </div>
        <div id="gridList">
        	<div class="tablecss">
            <table cellpadding="0" cellspacing="0" style="width: 100%; margin: 10px 0;">
                <thead>
	                <tr class="trbg">
                    <td width="5%"><strong>网点</strong></td>
                    <td width="5%"><strong>招标单位</strong></td>
                    <td width="5%"><strong>招标地点</strong></td>
                    <td width="5%"><strong>结束时间</strong></td>
                    <td width="5%"><strong>招标期限</strong></td>
                    <td width="5%"><strong>招标数目</strong></td>
                    <td width="5%"><strong>竞标价格</strong></td>
                    <td width="5%"><strong>价格类型</strong></td>
                    <td width="5%"><strong>招标说明</strong></td>
                    <td width="5%"><strong>竞标说明</strong></td>
                    <td width="5%"><strong>竞标状态</strong></td>
                    <td width="5%"><strong>操作</strong></td>
                </tr>
                </thead>
                
                <tbody id="itemContainer">
	                <c:forEach items="${list }" var ="var">
	                    <tr id="record_${var.ID }">
	                        <td>${var.GASSTATION_NAME }</td>
	                        <td>${var.COMPANY_NAME }</td>
	                        <td>${var.LOCATION }</td>
	                        <td>${var.END_TIME }</td>
	                        <td>${var.LIMITTIME }</td>
	                        <td>${var.QTY }</td>
	                        <td>
	                        	<c:if test="${var.PRICE_TYPE == 0 }">${var.PRICE }</c:if>
	                        	<c:if test="${var.PRICE_TYPE == 1 }">${var.PRICE1 }</c:if>
	                        </td>
	                        <td>
	                        	<c:if test="${var.PRICE_TYPE == 0 }">市价百分比</c:if>
	                        	<c:if test="${var.PRICE_TYPE == 1 }">比市价便宜</c:if>
	                        </td>
	                        <td>${var.AUCTION_NOTE }</td>
	                        <td>${var.NOTE }</td>
	                        <td>
	                        	<c:if test="${var.STATUS == 0 }">未中标</c:if>
	                        	<c:if test="${var.STATUS == 1 }">中标</c:if>
	                        </td>
	                        <td>
	                        	<a href="${pageContext.request.contextPath }/competitive!updateUI.do?id=${var.ID }" class="operation">编辑</a>
	                        </td>
	                    </tr>
	            	</c:forEach>
            	</tbody>
            </table>
        </div>
        <div class="holder2">共有<font color="#e4007f" style="">&nbsp<B>${requestScope.totalCount }</B>&nbsp</font>条记录</div>
        <div class="holder"></div>
        </div>
    </div>
</div>
</body>

</html>
